package com.wdh.server;

import com.wdh.dao.order.OrderMapper;
import com.wdh.dao.product.ProductMapper;
import com.wdh.entity.order.OrderEntity;
import com.wdh.entity.product.ProductEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Service
@Slf4j(topic = "OrderService")
public class OrderService {

    @Resource
    private OrderMapper orderMapper;

    @Resource
    private ProductMapper productMapper;

    public Object getOrder(){
        OrderEntity orderEntity = orderMapper.selectById(1);
        ProductEntity productEntity = productMapper.selectById(1);

        Map<String,Object> rsMap = new HashMap<>();
        rsMap.put("order",orderEntity);
        rsMap.put("product",productEntity);
        return rsMap;
    }
}
